/*
 * @Description: 
 * @version: 
 * @Author: cy
 * @Date: 2022-04-28 13:56:56
 * @LastEditors: cy
 * @LastEditTime: 2022-04-28 14:00:34
 */
const json = { 
    a: { b: { c: 1 } },
    d: { e: 2 }
}
const path = ['a', 'b', 'c'];
let p = json;
path.forEach(k => {
    p = p[k];
})
console.log('遍历从值：', p);